package com.maimao.kill.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.maimao.model.kill.KillGoods;
import com.maimao.model.kill.Schedule;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2021/4/10 4:20 下午
 */
public interface KillGoodsMapper extends BaseMapper<KillGoods> {
    int saveBatch(@Param("list") List<KillGoods> killGoodsList);

    List<KillGoods> selectStockAll(@Param("from") LocalDateTime fromTime, @Param("to") LocalDateTime toTime);

    int reduceStock(@Param("killId") Long killId);

    List<KillGoods> selectByScheduleId(@Param("scheduleId") Long scheduleId);
}
